public class EvenNumberTest
{
    public static void main(String[] args)
    {
        Thread t1 = new EvenNumber("线程1");

        t1.start();

//        t1.start();

        Thread t2 = new EvenNumber("线程2");

        t2.start();

        for (int i = 0; i <= 100; i++)
        {
            System.out.println(Thread.currentThread().getName() + ":" + i);
        }
    }

}

class EvenNumber extends Thread
{
    public EvenNumber(String name)
    {
        super(name);
    }

    @Override
    public void run()
    {
        for (int i = 0; i < 100; i++)
        {
            System.out.println(Thread.currentThread().getName() + ":" + i);
        }
    }
}